All Questions
Tagged with numpyimage-processing
1,785 questions
0votes
0answers
58views
Why doesn’t the barycenter method detect subpixel displacements where correlation does?
I’m working with X-ray imaging data. I have a reference image containing a structured pattern, and a sample image where this pattern is slightly distorted due to the presence of a physical sample. My ...
2votes
1answer
157views
How to simplify the generation process of these boolean images?
I have written code that generates Thue-Morse sequence, its output is a NumPy 2D array containing only 0s and 1s, the height of the array is 2n and the width is n. More specifically, each intermediate ...
0votes
2answers
90views
Channel extraction and interpolation from sparse color image arrays
I have a 'sparse colour' camera (KAI-4070 chip) which gives images with clear, red, green, and blue filtered pixels arranged in a 4x4 grid (kind of a generalized Bayer matrix) G C R C C G C R B C G C ...
-1votes
1answer
72views
ValueError: axes don't match array when trying to transpose
I'm fetching a frame correctly from webcam: success, image = self.video.read() But when I try to change the mode of my frame to grayscale using the following code: gray_image = cv2.cvtColor(image, ...
0votes
0answers
56views
How to speed up calibrating denoiser?
I'm trying to calibrate the denoiser like this: import numpy as np from skimage.restoration import ( calibrate_denoiser, denoise_tv_chambolle, denoise_invariant, ) # create random noisy ...
1vote
2answers
124views
How can I produce a delta plot between two RGB image with the same pixel size? [closed]
I have two RGB images of representing plot of a scalar variable on some geometry. My goal is to find a way to plot the difference of that variable btween the two images and color it with a custom ...
-1votes
1answer
98views
How can I make the image centered while padding in python
I am working on image processing. Since the input images have different sizes, I will crop them to a fixed size of 700x700. However, some images are slightly smaller than 700x700, so I want to apply ...
0votes
1answer
69views
How to optimize the weight for TV filter?
I have 2d data which has background noise and assembled high values. I'm trying to apply the TV filter to denoise the data. Is there a suitable method to avoid over-denoising the data? I have tried to ...
2votes
1answer
116views
How to filter a lot of colors out of an image, the numpy way
I have an image, from which I would like to filter some colors: if a given pixel is in my set of colors, I would like to replace it by a white pixel. With an image called original of shape (height, ...
3votes
1answer
61views
How to use skimage to denoise 2d array with nan values?
I'm trying to apply the TV filter to 2D array which includes many nan values: from skimage.restoration import denoise_tv_chambolle import numpy as np data_random = np.random.random ([100,100])*100 ...
3votes
3answers
175views
What is the most efficient way to randomly pick one positive location within a large binary mask image in Python?
I am writing a custom image data loading function to randomly crop part of a large image according to its binary mask. The function will be used in PyTorch dataloader so I want it to be as fast and ...
1vote
2answers
60views
Setting RGB value for a numpy array using boolean indexing
I have an array with shape (100, 80, 3) which is an rgb image. I have a boolean mask with shape (100, 80). I want each pixel where the mask is True to have value of pix_val = np.array([0.1, 0.2, 0.3])....
0votes
0answers
142views
Issues with Normal Pass Mapping from EXR Channels to RGB in Python Script
Problem I'm working on a Python script to generate images from EXR channel data for a larger project that requires accurate normal pass mappings. The script processes the X, Y, and Z channels from an ...
0votes
0answers
79views
Homomorphic filtering for low-light image enhancement
I have to write a image processing project that uses Homomorphic filtering for low-light image enhancement following this paper https://ieeexplore.ieee.org/document/9088214 So basically I have to log, ...
3votes
2answers
145views
With Python, how to apply vector operations to a neighborhood in an n-D image?
I have a 3D image with vector components (i.e., a mapping from R3 to R3). My goal is to replace each vector with the vector of maximum norm within its 3x3x3 neighborhood. This task is proving to be ...